using System;
using System.Collections.Generic;
using System.Text;

namespace Test.Support {
	class Branch {
		static void MainX() {
			string branch="3411";
			List<string> lst=new List<string>();
			lst.Add("PON-WPSQ21-DB10\\IN10,Heywood,overseas_branches");
			lst.Add("PON-WPSQ21-DB10\\IN10,Graphics,overseas_branches");
			lst.Add("PON-WPSQ21-DB10\\IN10,Worksop,overseas_branches");
			lst.Add("PON-WPSQ21-DB06\\IN06,Doncaster,overseas_branches");
			lst.Add("pon-wpsq21-DB08\\IN08,Overseas3,overseas_branches");
			lst.Add("PON-WPSQ21-DB08\\IN08,NTN2,overseas_branches");
			lst.Add("PON-WPSQ21-DB08\\IN08,StadiumWay,overseas_branches");
			lst.Add("PON-WPSQ21-DB02\\IN02 ,Elmsall,overseas_branches");
			lst.Add("PON-WPSQ21-DB08\\IN08,Stadium2,overseas_branches");
			lst.Add("PON-WPSQ21-DB02\\IN02,Elmsall,rfbranch");
			lst.Add("PON-WPSQ21-DB10\\IN10,Hub,hub_overseasbranches");
			lst.Add("PON-WPSQ21-DB07\\IN07,DearnePallet,overseas_branches");
			foreach(string con in lst)
			{
				string[] cinf=con.Split(',');
				DAL dal=new DAL(cinf[0],cinf[1]);
				int count=(int)dal.Scalar("select count(*) from {0} where branch='{1}'",cinf[2],branch);
				if(count==0)
					Console.WriteLine(dal.NonQry("insert into {0}(branch)values('{1}')",cinf[2],branch));
			}
		}
	}
}
